public class eg7_5 {
    public static void main(String[] args) {
        StringBuilder sBuilder =  new StringBuilder("I study ");
        sBuilder .append("Java");
        sBuilder.insert(2,"and Mike");
        System.out.println(sBuilder.length());
        System.out.println(sBuilder.capacity());
        sBuilder.delete(2,11);
        System.out.println(sBuilder);
        sBuilder. trimToSize();
        System.out.println(sBuilder.length());
        System.out.println(sBuilder.capacity());
        sBuilder.reverse();
        System.out.println(sBuilder.length());
        System.out.println(sBuilder.capacity());
    }
}
